package com.starlink.model.util;

import com.starlink.model.dtomapper.MallBooksRefundsDtoMapper;
import com.starlink.model.domain.MallBooksRefundsDO;
import com.starlink.model.vo.MallBooksRefundsVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallBooksRefundsConvert {

    public static List<MallBooksRefundsVO> buildMallBooksRefundsVoList(List<MallBooksRefundsDO> mallBooksRefundsDOList) {
        if (CollectionUtils.isEmpty(mallBooksRefundsDOList)) {
            return Lists.newArrayList();
        }
        List<MallBooksRefundsVO> mallBooksRefundsVOList = new ArrayList<>();
        for (MallBooksRefundsDO mallBooksRefundsDO : mallBooksRefundsDOList) {
            mallBooksRefundsVOList.add(MallBooksRefundsDtoMapper.INSTANCE.do2VO(mallBooksRefundsDO));
        }

        return mallBooksRefundsVOList;
    }
}
